Find Apple Developer ID Installer certificates - #258
Open
aritchie wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Certificate validity, signing eligibility, and filter separation issues remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds local macOS keychain discovery for Developer ID Installer certificates and surfaces them alongside App Store Connect certificates.
Changes:
- Merges local installer certificates with API results.
- Adds local-only metadata, filtering, badges, and revoke protection.
- Expands keychain handling and handler tests.
- Updates the operation cancellation contract.
File summaries
| File | Summary |
|---|---|
tests/MauiSherpa.Core.Tests/Handlers/Apple/GetCertificatesHandlerTests.cs |
Tests local certificate merging and deduplication. |
src/MauiSherpa/Pages/Certificates.razor |
Adds installer filtering and local-only presentation. |
src/MauiSherpa.Core/Services/LocalCertificateService.cs |
Queries installer identities from the keychain. |
src/MauiSherpa.Core/Interfaces.cs |
Adds certificate metadata and cancellation contract updates. |
src/MauiSherpa.Core/Handlers/Apple/GetCertificatesHandler.cs |
Converts and merges local installer certificates. |
Review details
Suppressed comments (1)
src/MauiSherpa.Core/Handlers/Apple/GetCertificatesHandler.cs:62
GetSigningIdentitiesAsynccan return identities markedIsValid == false(the parser explicitly records invalid-policy results), but this filter ignores that flag. An expired or revoked installer identity can therefore be merged as a usable local-only certificate; exclude invalid identities before converting them toAppleCertificate.
.Where(IsDeveloperIdInstaller)
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| static AppleCertificate ToCertificate(LocalSigningIdentity identity) => new( | ||
| Id: $"keychain:{identity.SerialNumber}", | ||
| Name: identity.CommonName, | ||
| CertificateType: DeveloperIdInstallerType, |
| Name: identity.CommonName, | ||
| CertificateType: DeveloperIdInstallerType, | ||
| Platform: "MAC_OS", | ||
| ExpirationDate: identity.ExpirationDate ?? DateTime.UtcNow.AddYears(1), |
| 1 => "DEVELOPMENT", | ||
| 2 => "DISTRIBUTION", | ||
| 3 => "DEVELOPER_ID", | ||
| 4 => "DEVELOPER_ID_INSTALLER", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for displaying and managing "Developer ID Installer" certificates that are only available in the local macOS keychain, as these are not returned by the App Store Connect API. The changes ensure these certificates are surfaced in the UI, distinguished from API-provided certificates, and handled correctly throughout the codebase and tests.
Apple Certificate Handling Improvements:
GetCertificatesHandlernow merges local "Developer ID Installer" certificates from the keychain with those returned by the App Store Connect API, ensuring these certificates are visible in the app even though they are not available from the API. Local-only certificates are marked with the newIsLocalOnlyproperty. [1] [2] [3]LocalCertificateService) now parses both codesigning and basic policies to find installer certificates, deduplicates results, and exposes a helper to identify installer identities. [1] [2]UI and Filtering Enhancements:
Testing Improvements:
GetCertificatesHandlerhave been expanded to cover the new logic for merging and distinguishing local-only installer certificates, ensuring correct behavior in various scenarios.Other Minor Changes:
AppleCertificaterecord now includes anIsLocalOnlyproperty to indicate certificates that exist only in the local keychain.IOperationModalinterface adds a method to request cancellation of running operations.